<?php
	include('../db/dbcon.php');
	include('../db/constants.php');
	include('../db/update_user_points_db.php');
?>

<!DOCTYPE html>
<html>
<body>

<table border="1px">
	<tr>
		<td> likes </td>
		<td> dislikes </td>
		<td> creation_date </td>
		<td> score </td>
	</tr>
	<?php 				// likes	dislikes	creation_date
	$values = array(	array(4, 2, "2014-09-02 00:00:00"),
	 					array(8, 2, "2014-09-02 00:00:00"),
	 					array(12, 2, "2014-09-02 00:00:00"),
	 					array(30, 2, "2014-09-02 00:00:00"),
	 					array(80, 2, "2014-09-02 00:00:00"),
	 					array(200, 2, "2014-09-02 00:00:00"),
	 					array(400, 2, "2014-09-02 00:00:00"),
	 					array(1000, 2, "2014-09-02 00:00:00"),
	 					array(4, 2, "2014-09-03 00:00:00"),
	 					array(8, 2, "2014-09-03 00:00:00"),
	 					array(12, 2, "2014-09-03 00:00:00"),
	 					array(4, 2, "2014-09-04 00:00:00"),
	 					array(8, 2, "2014-09-04 00:00:00"),
	 					array(12, 2, "2014-09-04 00:00:00"),
	 					array(2, 4, "2014-09-02 00:00:00"),
	 					array(2, 12, "2014-09-02 00:00:00"),
	 					array(2, 4, "2014-09-04 00:00:00"),
	 					array(2, 12, "2014-09-04 00:00:00"),);

	for ($i = 0; $i < count($values); $i++) {
		$score = getCategoryScore($values[$i][0], $values[$i][1], $values[$i][2]);
		echo "<tr>";
			echo "<td>".$values[$i][0]."</td>";
			echo "<td>".$values[$i][1]."</td>";
			echo "<td>".$values[$i][2]."</td>";
			echo "<td>".$score."</td>";
		echo "</tr>";
	}
	?>
</table>

</body>
</html>
